<?php
/**
 * 前端首页。
 *
 */
class Front_IndexController extends BasePage implements IController
{
	/**
	 * 构造函数。
	 *
	 */
	function __construct() {
		parent::__construct();
	}
	
	/**
	 * 控制转发器。
	 *
	 */
	function dispatcher() {
		if ($this->isPostback) {
			
		} else {
			$this->assign('blogs', $this->db->fetchAll("SELECT * FROM `tbg_blogs` WHERE `permission` = 1 ORDER BY `addtime` DESC LIMIT 10"));
			
			include (CLASS_PATH . 'data/Sidebar.class.php');
			
			$sidebar = new Sidebar($this->db);
			$sidebar->setDefault($this, 3);
			
			$this->display('index');
		}
	}
}